import { createApp } from 'vue'
import GlobalComponent from './components/GlobalComponent.vue';
import App from './App.vue'
import axios from "axios";
axios.defaults.baseURL="http://localhost:8080"
const app=createApp(App)//创建一个vue对象

//pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
app.use(pinia)

import persist from 'pinia-plugin-persistedstate'
app.use(createPinia().use(persist))

import router from './router/index'
app.use(router)//使用路由

//注册全局组件
app.component("GlobalComponent" ,GlobalComponent)

/* 引入Element-Plus插件 */
import ElementPlus from 'element-plus'
/* 引入Element-Plus样式 */
import 'element-plus/dist/index.css'
/*解决Element-plus默认分页文字为英文*/
import locale from "element-plus/es/locale/lang/zh-cn";
/* 使用Element-Plus插件 */

app.use(ElementPlus,{locale})



app.mount('#app')
